package com.iwhalecloud.citybrain.flow.platform.manager.domain.repository;

import com.iwhalecloud.citybrain.flow.platform.manager.common.client.HttpTaskRollbackDto;
import com.iwhalecloud.citybrain.flow.platform.manager.domain.model.task.TaskRollbackVo;

/**
 * @author lich
 * @date 2021/11/8
 *
 */
public interface FlowRollbackService {

    /**
     * 回退到上一节点
     * @param taskRollbackDto
     * @return
     */
    void rollbackToPreNode(HttpTaskRollbackDto taskRollbackDto) throws Exception;

    /**
     * 回退到上一个节点
     * @param taskRollbackVo
     * @throws Exception
     */
    void rollbackToPreNode(TaskRollbackVo taskRollbackVo, String userCode) throws Exception;
    /**
     * 回退到上一个节点
     * @throws Exception
     */
     void rollbackToPreNode(String taskId, String comment, String userCode)throws Exception;

    /**
     * 拿回
     * @throws Exception
     */
    void takeBack(String taskId, String comment, String userCode)throws Exception;
    /**
     * 回归到第一个节点
     * @param taskRollbackDto
     * @throws Exception
     */
    void rollbackToFirstNode(HttpTaskRollbackDto taskRollbackDto) throws Exception;

    /**
     * 回退到给定节点
     * @param taskRollbackDto
     * @throws Exception
     */
    void rollbackToTargetNode(HttpTaskRollbackDto taskRollbackDto) throws Exception;


}
